<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../lib/react.development.js"></script>
    <script src="../lib/react-dom.development.js"></script>
    <script src="../lib/babel.min.js"></script>
</head>
<div id="root">

</div>

<body>
    <script type="text/babel">
        const root = ReactDOM.createRoot(document.getElementById('root'));
        // react 必须要求只能有一个根节点
        // 可以使用文档碎片 <></>
        // 最终版本
        root.render((
            <>
                <div>div1</div>
                <div>div2</div>
            </>
        ));
        // 其他版本
        root.render((
            <React.Fragment>
                <div>div1</div>
                <div>div2</div>
            </React.Fragment>
        ))
    </script>
</body>
</html>